/* ==========================================================================
   Tab Container

   Default Mendix Tab Container Widget. Tab containers are used to show information categorized into multiple tab pages. 
   This can be very useful if the amount of information that has to be displayed is larger than the amount of space on the screen
========================================================================== */

.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        margin-bottom: 20px;
        border-color: $tabs-border-color;
        > li > a {
            margin-right: 0;
            -webkit-transition: all 0.2s ease-in-out;
            -moz-transition: all 0.2s ease-in-out;
            -o-transition: all 0.2s ease-in-out;
            transition: all 0.2s ease-in-out;
            color: $tabs-color;
            font-weight: $font-weight-normal;
            &:hover,
            &:focus {
                background-color: $tabs-bg-hover;
            }
        }
        > li.active > a,
        > li.active > a:hover,
        > li.active > a:focus {
            color: $tabs-color-active;
            border: 1px solid $tabs-border-color;
            border-bottom-color: transparent;
            background-color: $tabs-bg;
        }
    }
}

//== Design Properties
//## Helper classes to change the look and feel of the component
//-------------------------------------------------------------------------------------------------------------------//
// Style as pills
.tab-pills.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        border: 0;
        > li > a {
            margin-right: 2px;
            color: $tabs-color;
            border: 1px solid $tabs-border-color;
            border-radius: 4px;
            &:hover,
            &:focus {
                background-color: $tabs-bg-hover;
            }
        }
        > li.active > a,
        > li.active > a:hover,
        > li.active > a:focus {
            color: #FFFFFF;
            border-color: $tabs-bg-active;
            background-color: $tabs-bg-active;
        }
    }
}

// Style with lines
.tab-lined.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        border-width: 3px;
        li {
            margin-right: 30px;
            margin-bottom: -3px;
            > a {
                padding: 10px 0;
                color: $tabs-color;
                border: 0;
                border-style: solid;
                border-color: transparent;
                border-bottom-width: 3px;
                border-radius: 0;
                &:hover,
                &:focus {
                    color: $tabs-color;
                    border: 0;
                    border-color: transparent;
                    background: transparent;
                }
            }
            &.active > a,
            &.active > a:hover,
            &.active > a:focus {
                color: $tabs-lined-color-active;
                border: 0;
                border-bottom: 3px solid $tabs-lined-border-color;
                background-color: transparent;
            }
        }
    }
}

// Justified style
// Lets your tabs take 100% of the width
.tab-justified.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        width: 100%;
        border-bottom: 0;
        > li {
            display: table-cell;
            float: none;
            width: 1%;
            margin: 0;
            @media (max-width: $screen-xs-max) {
                display: block;
                width: 100%;
            }
            > a {
                text-align: center;
                border-bottom: 1px solid $tabs-border-color;
            }
        }
        > li.active > a {
            border-bottom-color: transparent;
            border-radius: 4px;
            @media (max-width: $screen-xs-max) {
                border-bottom-color: $tabs-border-color;
            }
        }
    }
}

// Bordered
.tab-bordered.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        margin: 0;
    }
    .mx-tabcontainer-content {
        padding: 10px;
        border-width: 0 1px 1px 1px;
        border-style: solid;
        border-color: $tabs-border-color;
        background-color: #FFFFFF;
    }
}

// Wizard
.tab-wizard.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        border-style: none;
        position: relative;
        display: flex;
        justify-content: space-between;

        &::before {
            content: "";
            height: 1px;
            position: absolute;
            width: 100%;
            display: block;
            top: 16px;
            background-color: $tabs-border-color;
        }
        > li {
            position: relative;
            width: 100%;
            text-align: center;
            float: none;
            > a {
                text-align: center;
                margin: auto;
                height: 33px;
                width: 33px;
                padding: 0;
                line-height: 33px;
                font-size: 18px;
                font-weight: bold;
                color: $brand-default;
                border: 1px solid $tabs-border-color;
                background-color: #FFFFFF;
                border-radius: 100%;
            }
            &.active {
                > a,
                > a:hover,
                > a:focus {
                    color: #FFFFFF;
                    border-color: $tabs-bg-active;
                    background-color: $tabs-bg-active;
                }
            }
        }
    }
}

// Tab Styling Specific for mobile
.tab-mobile.mx-tabcontainer {
    .mx-tabcontainer-tabs {
        margin: 0;
        text-align: center;
        border-style: none;
        background-color: $brand-primary;
        li {
            display: table-cell;
            float: none;
            width: 1%;
            margin: 0;
            text-align: center;
            border-style: none;
            border-radius: 0;
            a {
                padding: 15px;
                text-transform: uppercase;
                color: #FFFFFF;
                border-width: 0 1px 0 0;
                border-style: solid;
                border-color: rgba(255,255,255,0.3);
                border-radius: 0;
                font-size: 12px;
                font-weight: $font-weight-normal;
                &:hover,
                &:focus {
                    background-color: inherit;
                }
            }
            &:last-child a {
                border-right: none;
            }
            &.active > a,
            &.active > a:hover,
            &.active > a:focus {
                color: #FFFFFF;
                border-style: none;
                border-radius: 0;
                background-color: mix($brand-primary, #000000, 80%);
            }
        }
    }
}
